package com.java.manage.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.java.manage.mapper.TbItemParamItemMapper;
import com.java.manage.mapper.TbItemParamMapper;
import com.java.manage.pojo.TbItemParamItem;
import com.java.manage.service.TbItemParamItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * @ClassName TbItemParamItemServiceImpl
 * @Description 修改商品参数关联表
 * @Author Trigger Wu
 * @Date 2018/9/1019:21
 * @Version 1.0
 **/
@Service
public class TbItemParamItemServiceImpl extends ServiceImpl<TbItemParamItemMapper,TbItemParamItem> implements TbItemParamItemService {


    public Integer updateItemParamItem(Long itemId, String itemParams) {
        // 更新数据
        TbItemParamItem itemParamItem = new TbItemParamItem();
        itemParamItem.setParamData(itemParams);
        itemParamItem.setUpdated(new Date());
        return 0;
//        // 更新的条件
//        Example example = new Example(TbItemParamItem.class);
//        example.createCriteria().andEqualTo("itemId", itemId);
//
//        return this.itemParamItemMapper.updateByExampleSelective(itemParamItem, example);
    }
}
